package top.zywork.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.zywork.dao.AccountStatisticsDAO;
import top.zywork.dao.MallStatisticsDAO;
import top.zywork.service.AccountStatisticsService;
import top.zywork.service.MallStatisticsService;
import top.zywork.vo.StatisticsDayCountVO;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 平台出入账统计服务接口实现类<br/>
 *
 * 创建于2019-11-19<br/>
 *
 * @author http://zywork.top 王振宇
 * @version 1.0
 */
@Service
public class AccountStatisticsServiceImpl implements AccountStatisticsService {

    private AccountStatisticsDAO accountStatisticsDAO;

    @Override
    public BigDecimal countAllAccount() {
        return accountStatisticsDAO.countAllAccount();
    }

    @Override
    public BigDecimal countAllAccountByType(Byte type) {
        return accountStatisticsDAO.countAllAccountByType(type);
    }

    @Override
    public BigDecimal countTotalCommission() {
        return accountStatisticsDAO.countTotalCommission();
    }

    @Override
    public List<StatisticsDayCountVO> countDayAccountByTime(Date beginTime, Date endTime) {
        return accountStatisticsDAO.countDayAccountByTime(beginTime, endTime);
    }

    @Override
    public BigDecimal countAllAccountByTime(Date beginTime, Date endTime) {
        return accountStatisticsDAO.countAllAccountByTime(beginTime, endTime);
    }

    @Autowired
    public void setAccountStatisticsDAO(AccountStatisticsDAO accountStatisticsDAO) {
        this.accountStatisticsDAO = accountStatisticsDAO;
    }
}
